import json
import nlpaug.augmenter.sentence
import pandas as pd

sleep_data_all_df = pd.read_excel('data/sleep_data_all.xlsx')

print(sleep_data_all_df.head())
with open('../data/toy_sleep_fine_tuning.jsonl', 'w', encoding='utf-8') as output_file:
    data = []
    for item in sleep_data_all_df.iterrows():
        currMap = {
            "messages": [
                {"role": "system", "content": item[1]["system_prompt"]},
                {"role": "user", "content": item[1]["insight"]},
                {"role": "assistant", "content": item[1]["gemini_ai_response"]},
            ]
        }
        data.append(json.JSONEncoder(ensure_ascii=False).encode(currMap)+"\n")
    output_file.writelines(data)

